package vip.xumy.admin.verify.mapper;

import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import vip.xumy.admin.verify.pojo.User;

/**
 * @author:mengyxu
 * @date:2020年10月28日
 */

public interface IUserMapper {

	@Select({ "SELECT * FROM user WHERE user_id = #{userId} AND password = #{password}" })
	@Results({ @Result(property = "userId", column = "user_id") })
	User login(User param);

	@Update({ "UPDATE user SET password = #{newPwd} WHERE user_id = #{userId} AND password = #{password}" })
	int updatePassword(User param);

}
